using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region ProdAttribute

	/// <summary>
	/// ProdAttribute object for NHibernate mapped table 'Prod_Attribute'.
	/// </summary>
	public class ProdAttribute
	{
		#region Member Variables
		
		protected int _id;
		protected int _prodTypeId;
		protected string _attrName;
		protected string _attrEnName;
		protected int _attrType;
		protected string _attrValue;
		protected bool _isNull;
		protected bool _isBackShow;
		protected string _defaultValue;

		#endregion

		#region Constructors

		public ProdAttribute() { }

		public ProdAttribute( int prodTypeId, string attrName, string attrEnName, int attrType, string attrValue, bool isNull, bool isBackShow, string defaultValue )
		{
			this._prodTypeId = prodTypeId;
			this._attrName = attrName;
			this._attrEnName = attrEnName;
			this._attrType = attrType;
			this._attrValue = attrValue;
			this._isNull = isNull;
			this._isBackShow = isBackShow;
			this._defaultValue = defaultValue;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual int ProdTypeId
		{
			get { return _prodTypeId; }
			set { _prodTypeId = value; }
		}

		public  virtual string AttrName
		{
			get { return _attrName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for AttrName", value, value.ToString());
				_attrName = value;
			}
		}

		public  virtual string AttrEnName
		{
			get { return _attrEnName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for AttrEnName", value, value.ToString());
				_attrEnName = value;
			}
		}

		public  virtual int AttrType
		{
			get { return _attrType; }
			set { _attrType = value; }
		}

		public  virtual string AttrValue
		{
			get { return _attrValue; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for AttrValue", value, value.ToString());
				_attrValue = value;
			}
		}

		public  virtual bool IsNull
		{
			get { return _isNull; }
			set { _isNull = value; }
		}

		public  virtual bool IsBackShow
		{
			get { return _isBackShow; }
			set { _isBackShow = value; }
		}

		public  virtual string DefaultValue
		{
			get { return _defaultValue; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for DefaultValue", value, value.ToString());
				_defaultValue = value;
			}
		}

		

		#endregion
	}
	#endregion
}